1. Field of the Invention
The present invention relates to a magnetic sensor device which converts a magnetic field intensity into an electric signal, and, for example, relates to a magnetic sensor device used as a sensor for detecting an open/close state of a folder-type cellular phone, a notebook computer, or the like or a sensor for detecting a rotational position of a motor.
2. Description of the Related Art
As a sensor for detecting an open/close state in a folder-type cellular phone, a notebook computer, or the like or a sensor for detecting a rotational position of a motor, a magnetic sensor device is used.
A magnetic sensor device outputs a voltage in proportion to a magnetic field intensity or a magnetic flux density by a magnetoelectric converting element (for example, Hall element), amplifies the output voltage by an amplifier, makes a determination using a comparator, and outputs a binary signal of an H signal or an L signal. An output voltage of a magnetoelectric converting element is minute, and thus, an offset voltage of the magnetoelectric converting element (element offset voltage), an offset voltage of the amplifier or the comparator (input offset voltage), or noise generated in the converting element becomes a problem. The element offset voltage is generated mainly by a stress applied to the magnetoelectric converting element from a package or the like. The input offset voltage is generated mainly by variations in the characteristics of an element which forms an input circuit of the amplifier. The noise is generated mainly by flicker noise of a single transistor which forms a circuit or thermal noise of a single transistor or a resistance element.
A magnetic sensor device which reduces the effect of an offset voltage of the above-mentioned magnetoelectric converting element or amplifier has been invented (see, for example, Japanese Patent Application Laid-open No. 2010-281801). A related-art magnetic sensor device illustrated in FIG. 4 includes a Hall element 51 which is a magnetoelectric converting element, a changeover switch circuit 52, a differential amplifier 53, a comparator 54, a detection voltage setting circuit 55, a first capacitor C51 and a second capacitor C52, and a first switch S51 and a second switch S52.
The differential amplifier 53 has an instrumentation amplifier configuration as illustrated in FIG. 5, and includes differential amplifiers 61 and 62 and resistors R61, R62, and R63. Each of the differential amplifiers 61 and 62 operates as a noninverting amplifier. A first input terminal of the differential amplifier 53 is connected to a noninverting input terminal E61 of the differential amplifier 61, a second input terminal of the differential amplifier 53 is connected to a noninverting input terminal E62 of the differential amplifier 62, a first output terminal of the differential amplifier 53 is connected to an output terminal E63 of the differential amplifier 61, and a second output terminal of the differential amplifier 53 is connected to an output terminal E64 of the differential amplifier 62. The differential amplifier 53 having such instrumentation amplifier configuration enables inhibiting the effect of in-phase noise in differential input. In this case, it is assumed that the amplification factors of the differential amplifiers 61 and 62 are set to be equal to each other.
FIG. 6 shows a timing chart of an operation of the related-art magnetic sensor device. A cycle T of a detection operation is divided into a first detection state T1 in which a power supply voltage is input to a first terminal pair A-C of the Hall element 51 and a detection voltage is output from a second terminal pair B-D by the operation of the above-mentioned changeover switch circuit 52, and a second detection state T2 in which the power supply voltage is input to the second terminal pair B-D and a detection voltage is output from the first terminal pair A-C by the operation of the above-mentioned changeover switch circuit 52. Further, the cycle T is divided into a first sample phase F1, a second sample phase F2, and a comparison phase F3 by opening and closing the respective switches. In the comparison phase F3, offset components are removed.
However, in the related-art magnetic sensor device, time-division operation in which a plurality of signal processing periods such as a sample phase and a comparison phase is necessary to be provided for the purpose of cancelling out offset components, which is inappropriate for high speed signal processing. Further, the time-division operation requires connection of a switch circuit and a capacitor element, which complicates the circuit configuration.